Component({
    behaviors: [ "wx://form-field" ],
    properties: {
        placeholder: String,
        placeholderStyle: String,
        cursorSpacing: {
            type: String,
            value: "0"
        },
        name: {
            type: String,
            value: "value"
        },
        disabled: {
            type: Boolean,
            value: !1
        },
        adjustPosition: {
            type: Boolean,
            value: !0
        },
        autoFocus: {
            type: Boolean,
            value: !1
        },
        selectionStart: {
            type: Number,
            value: -1
        },
        selectionEnd: {
            type: Number,
            value: -1
        },
        value: {
            type: String,
            value: ""
        },
        maxlength: {
            type: Number,
            value: -1
        },
        counter: Boolean
    },
    data: {
        textareaShown: !1
    },
    methods: {
        onInput: function(t) {
            this.setData({
                value: t.detail.value || ""
            }), this.$eventEmit("input");
        },
        onFocus: function() {
            var t = this;
            this.setData({
                textareaShown: !0
            }), setTimeout(function() {
                t.setData({
                    textareaFocus: !0
                });
            }, 200);
        },
        onBlur: function() {
            this.setData({
                textareaShown: !1,
                textareaFocus: !1
            });
        },
        onConfirm: function() {
            this.setData({
                autoFocus: !1
            }), this.$eventEmit("confirm");
        },
        $eventEmit: function(t) {
            var e = this.data, a = e.value, n = e.name;
            this.triggerEvent(t, {
                name: n,
                value: a
            }, {});
        }
    }
});